package Card1;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2025-03-03
 * Time: 21:06
 */
public class Main {
    public static void main(String[] args) {
        //洗牌算法
        //1.生成 52 张牌
        System.out.println("生成的 52 张牌如下：");
        Card_Operation card_operation = new Card_Operation();
        List<Card> cardList = card_operation.generate_card();
        System.out.println(cardList);
        //2.打乱
        System.out.println("洗乱后的牌：");
        card_operation.shuffle(cardList);
        System.out.println(cardList);
        //3.三个人，分别拿取 5 张牌
        List<List<Card>> hand = card_operation.play(cardList);
        //循环打印三个人中，手里的牌，和牌库剩余的牌
        for (int i = 1; i <= hand.size(); i++) {
            System.out.println("第 " + i + " 个人手里的牌：" + hand.get(i-1));
        }
        System.out.println(cardList);
    }
}
